﻿#region Using directives

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Configuration.Provider;
using System.Web.Configuration;
using System.Web;
using InfoExpress.HIV.Domains;
using InfoExpress.HIV.DataAccess;
using InfoExpress.HIV.DataAccess.Bases;

#endregion

namespace InfoExpress.HIV.DataAccess
{
	/// <summary>
	/// This class represents the Data source repository and gives access to all the underlying providers.
	/// </summary>
	[CLSCompliant(true)]
	public sealed class DataRepository 
	{
		private static volatile NetTiersProvider _provider = null;
        private static volatile NetTiersProviderCollection _providers = null;
		private static volatile NetTiersServiceSection _section = null;
        
        private static object SyncRoot = new object();
				
		private DataRepository()
		{
		}
		
		#region Public LoadProvider
		/// <summary>
        /// Enables the DataRepository to programatically create and 
        /// pass in a <c>NetTiersProvider</c> during runtime.
        /// </summary>
        /// <param name="provider">An instatiated NetTiersProvider.</param>
        public static void LoadProvider(NetTiersProvider provider)
        {
			LoadProvider(provider, false);
        }
		
		/// <summary>
        /// Enables the DataRepository to programatically create and 
        /// pass in a <c>NetTiersProvider</c> during runtime.
        /// </summary>
        /// <param name="provider">An instatiated NetTiersProvider.</param>
        /// <param name="setAsDefault">ability to set any valid provider as the default provider for the DataRepository.</param>
		public static void LoadProvider(NetTiersProvider provider, bool setAsDefault)
        {
            if (provider == null)
                throw new ArgumentNullException("provider");

            if (_providers == null)
			{
				lock(SyncRoot)
				{
            		if (_providers == null)
						_providers = new NetTiersProviderCollection();
				}
			}
			
            if (_providers[provider.Name] == null)
            {
                lock (_providers.SyncRoot)
                {
                    _providers.Add(provider);
                }
            }

            if (_provider == null || setAsDefault)
            {
                lock (SyncRoot)
                {
                    if(_provider == null || setAsDefault)
                         _provider = provider;
                }
            }
        }
		#endregion 
		
		///<summary>
		/// Configuration based provider loading, will load the providers on first call.
		///</summary>
		private static void LoadProviders()
        {
            // Avoid claiming lock if providers are already loaded
            if (_provider == null)
            {
                lock (SyncRoot)
                {
                    // Do this again to make sure _provider is still null
                    if (_provider == null)
                    {
                        // Load registered providers and point _provider to the default provider
                        _providers = new NetTiersProviderCollection();

                        ProvidersHelper.InstantiateProviders(NetTiersSection.Providers, _providers, typeof(NetTiersProvider));
						_provider = _providers[NetTiersSection.DefaultProvider];

                        if (_provider == null)
                        {
                            throw new ProviderException("Unable to load default NetTiersProvider");
                        }
                    }
                }
            }
        }

		/// <summary>
        /// Gets the provider.
        /// </summary>
        /// <value>The provider.</value>
        public static NetTiersProvider Provider
        {
            get { LoadProviders(); return _provider; }
        }

		/// <summary>
        /// Gets the provider collection.
        /// </summary>
        /// <value>The providers.</value>
        public static NetTiersProviderCollection Providers
        {
            get { LoadProviders(); return _providers; }
        }
		
		/// <summary>
		/// Creates a new <c cref="TransactionManager"/> instance from the current datasource.
		/// </summary>
		/// <returns></returns>
		public TransactionManager CreateTransaction()
		{
			return _provider.CreateTransaction();
		}

		#region Configuration

		/// <summary>
		/// Gets a reference to the configured NetTiersServiceSection object.
		/// </summary>
		public static NetTiersServiceSection NetTiersSection
		{
			get
			{
				// Try to get a reference to the default <netTiersService> section
				_section = WebConfigurationManager.GetSection("netTiersService") as NetTiersServiceSection;

				if ( _section == null )
				{
					// otherwise look for section based on the assembly name
					_section = WebConfigurationManager.GetSection("InfoExpress.HIV.DataAccess") as NetTiersServiceSection;
				}

				if ( _section == null )
				{
					throw new ProviderException("Unable to load NetTiersServiceSection");
				}

				return _section;
			}
		}

		#endregion Configuration

		#region Connections

		/// <summary>
		/// Gets a reference to the ConnectionStringSettings collection.
		/// </summary>
		public static ConnectionStringSettingsCollection ConnectionStrings
		{
			get
			{
				return WebConfigurationManager.ConnectionStrings;
			}
		}

		// dictionary of connection providers
		private static Dictionary<String, ConnectionProvider> _connections;

		/// <summary>
		/// Gets the dictionary of connection providers.
		/// </summary>
		public static Dictionary<String, ConnectionProvider> Connections
		{
			get
			{
				if ( _connections == null )
				{
					lock (SyncRoot)
                	{
						if (_connections == null)
						{
							_connections = new Dictionary<String, ConnectionProvider>();
		
							// add a connection provider for each configured connection string
							foreach ( ConnectionStringSettings conn in ConnectionStrings )
							{
								_connections.Add(conn.Name, new ConnectionProvider(conn.Name, conn.ConnectionString));
							}
						}
					}
				}

				return _connections;
			}
		}

		/// <summary>
		/// Adds the specified connection string to the map of connection strings.
		/// </summary>
		/// <param name="connectionStringName">The connection string name.</param>
		/// <param name="connectionString">The provider specific connection information.</param>
		public static void AddConnection(String connectionStringName, String connectionString)
		{
			lock (SyncRoot)
            {
				Connections.Remove(connectionStringName);
				ConnectionProvider connection = new ConnectionProvider(connectionStringName, connectionString);
				Connections.Add(connectionStringName, connection);
			}
		}

		/// <summary>
		/// Provides ability to switch connection string at runtime.
		/// </summary>
		public sealed class ConnectionProvider
		{
			private NetTiersProvider _provider;
			private NetTiersProviderCollection _providers;
			private String _connectionStringName;
			private String _connectionString;


			/// <summary>
			/// Initializes a new instance of the ConnectionProvider class.
			/// </summary>
			/// <param name="connectionStringName">The connection string name.</param>
			/// <param name="connectionString">The provider specific connection information.</param>
			public ConnectionProvider(String connectionStringName, String connectionString)
			{
				_connectionString = connectionString;
				_connectionStringName = connectionStringName;
			}

			/// <summary>
			/// Gets the provider.
			/// </summary>
			public NetTiersProvider Provider
			{
				get { LoadProviders(); return _provider; }
			}

			/// <summary>
			/// Gets the provider collection.
			/// </summary>
			public NetTiersProviderCollection Providers
			{
				get { LoadProviders(); return _providers; }
			}

			/// <summary>
			/// Instantiates the configured providers based on the supplied connection string.
			/// </summary>
			private void LoadProviders()
			{
				DataRepository.LoadProviders();

				// Avoid claiming lock if providers are already loaded
				if ( _providers == null )
				{
					lock ( SyncRoot )
					{
						// Do this again to make sure _provider is still null
						if ( _providers == null )
						{
							// apply connection information to each provider
							for ( int i = 0; i < NetTiersSection.Providers.Count; i++ )
							{
								NetTiersSection.Providers[i].Parameters["connectionStringName"] = _connectionStringName;
								// remove previous connection string, if any
								NetTiersSection.Providers[i].Parameters.Remove("connectionString");

								if ( !String.IsNullOrEmpty(_connectionString) )
								{
									NetTiersSection.Providers[i].Parameters["connectionString"] = _connectionString;
								}
							}

							// Load registered providers and point _provider to the default provider
							_providers = new NetTiersProviderCollection();

							ProvidersHelper.InstantiateProviders(NetTiersSection.Providers, _providers, typeof(NetTiersProvider));
							_provider = _providers[NetTiersSection.DefaultProvider];
						}
					}
				}
			}
		}

		#endregion Connections

		#region Static properties
		
		#region TrangThaiProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="TrangThai"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static TrangThaiProviderBase TrangThaiProvider
		{
			get 
			{
				LoadProviders();
				return _provider.TrangThaiProvider;
			}
		}
		
		#endregion
		
		#region BenhNhanDangKyProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="BenhNhanDangKy"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static BenhNhanDangKyProviderBase BenhNhanDangKyProvider
		{
			get 
			{
				LoadProviders();
				return _provider.BenhNhanDangKyProvider;
			}
		}
		
		#endregion
		
		#region SUsersProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="SUsers"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static SUsersProviderBase SUsersProvider
		{
			get 
			{
				LoadProviders();
				return _provider.SUsersProvider;
			}
		}
		
		#endregion
		
		#region ThayDoiPhacDoProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ThayDoiPhacDo"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ThayDoiPhacDoProviderBase ThayDoiPhacDoProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ThayDoiPhacDoProvider;
			}
		}
		
		#endregion
		
		#region ThayDoiDieuTriProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ThayDoiDieuTri"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ThayDoiDieuTriProviderBase ThayDoiDieuTriProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ThayDoiDieuTriProvider;
			}
		}
		
		#endregion
		
		#region UtPhacdoProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="UtPhacdo"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static UtPhacdoProviderBase UtPhacdoProvider
		{
			get 
			{
				LoadProviders();
				return _provider.UtPhacdoProvider;
			}
		}
		
		#endregion
		
		#region UtDmdvProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="UtDmdv"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static UtDmdvProviderBase UtDmdvProvider
		{
			get 
			{
				LoadProviders();
				return _provider.UtDmdvProvider;
			}
		}
		
		#endregion
		
		#region UtDmxnProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="UtDmxn"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static UtDmxnProviderBase UtDmxnProvider
		{
			get 
			{
				LoadProviders();
				return _provider.UtDmxnProvider;
			}
		}
		
		#endregion
		
		#region PhanLoaiBenhNhanProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="PhanLoaiBenhNhan"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static PhanLoaiBenhNhanProviderBase PhanLoaiBenhNhanProvider
		{
			get 
			{
				LoadProviders();
				return _provider.PhanLoaiBenhNhanProvider;
			}
		}
		
		#endregion
		
		#region UtDmuserProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="UtDmuser"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static UtDmuserProviderBase UtDmuserProvider
		{
			get 
			{
				LoadProviders();
				return _provider.UtDmuserProvider;
			}
		}
		
		#endregion
		
		#region LoaiProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Loai"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static LoaiProviderBase LoaiProvider
		{
			get 
			{
				LoadProviders();
				return _provider.LoaiProvider;
			}
		}
		
		#endregion
		
		#region PdmqhProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Pdmqh"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static PdmqhProviderBase PdmqhProvider
		{
			get 
			{
				LoadProviders();
				return _provider.PdmqhProvider;
			}
		}
		
		#endregion
		
		#region LichSuDieuTriProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="LichSuDieuTri"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static LichSuDieuTriProviderBase LichSuDieuTriProvider
		{
			get 
			{
				LoadProviders();
				return _provider.LichSuDieuTriProvider;
			}
		}
		
		#endregion
		
		#region ChuyenOpcBufferProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="ChuyenOpcBuffer"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static ChuyenOpcBufferProviderBase ChuyenOpcBufferProvider
		{
			get 
			{
				LoadProviders();
				return _provider.ChuyenOpcBufferProvider;
			}
		}
		
		#endregion
		
		#region DieuTriProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="DieuTri"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static DieuTriProviderBase DieuTriProvider
		{
			get 
			{
				LoadProviders();
				return _provider.DieuTriProvider;
			}
		}
		
		#endregion
		
		#region PdmphxaProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Pdmphxa"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static PdmphxaProviderBase PdmphxaProvider
		{
			get 
			{
				LoadProviders();
				return _provider.PdmphxaProvider;
			}
		}
		
		#endregion
		
		#region PdmdtProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Pdmdt"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static PdmdtProviderBase PdmdtProvider
		{
			get 
			{
				LoadProviders();
				return _provider.PdmdtProvider;
			}
		}
		
		#endregion
		
		#region PdmnnProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Pdmnn"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static PdmnnProviderBase PdmnnProvider
		{
			get 
			{
				LoadProviders();
				return _provider.PdmnnProvider;
			}
		}
		
		#endregion
		
		#region UtTinhProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="UtTinh"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static UtTinhProviderBase UtTinhProvider
		{
			get 
			{
				LoadProviders();
				return _provider.UtTinhProvider;
			}
		}
		
		#endregion
		
		#region PdmnclnProvider

		///<summary>
		/// Gets the current instance of the Data Access Logic Component for the <see cref="Pdmncln"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		public static PdmnclnProviderBase PdmnclnProvider
		{
			get 
			{
				LoadProviders();
				return _provider.PdmnclnProvider;
			}
		}
		
		#endregion
		
		
		#endregion
	}
	
	#region Query/Filters
		
	#region TrangThaiFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="TrangThai"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class TrangThaiFilters : TrangThaiFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the TrangThaiFilters class.
		/// </summary>
		public TrangThaiFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the TrangThaiFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public TrangThaiFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the TrangThaiFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public TrangThaiFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion TrangThaiFilters
	
	#region TrangThaiQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="TrangThaiParameterBuilder"/> class
	/// that is used exclusively with a <see cref="TrangThai"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class TrangThaiQuery : TrangThaiParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the TrangThaiQuery class.
		/// </summary>
		public TrangThaiQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the TrangThaiQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public TrangThaiQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the TrangThaiQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public TrangThaiQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion TrangThaiQuery
		
	#region BenhNhanDangKyFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="BenhNhanDangKy"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class BenhNhanDangKyFilters : BenhNhanDangKyFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the BenhNhanDangKyFilters class.
		/// </summary>
		public BenhNhanDangKyFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the BenhNhanDangKyFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public BenhNhanDangKyFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the BenhNhanDangKyFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public BenhNhanDangKyFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion BenhNhanDangKyFilters
	
	#region BenhNhanDangKyQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="BenhNhanDangKyParameterBuilder"/> class
	/// that is used exclusively with a <see cref="BenhNhanDangKy"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class BenhNhanDangKyQuery : BenhNhanDangKyParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the BenhNhanDangKyQuery class.
		/// </summary>
		public BenhNhanDangKyQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the BenhNhanDangKyQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public BenhNhanDangKyQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the BenhNhanDangKyQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public BenhNhanDangKyQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion BenhNhanDangKyQuery
		
	#region SUsersFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="SUsers"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class SUsersFilters : SUsersFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the SUsersFilters class.
		/// </summary>
		public SUsersFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the SUsersFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public SUsersFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the SUsersFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public SUsersFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion SUsersFilters
	
	#region SUsersQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SUsersParameterBuilder"/> class
	/// that is used exclusively with a <see cref="SUsers"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class SUsersQuery : SUsersParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the SUsersQuery class.
		/// </summary>
		public SUsersQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the SUsersQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public SUsersQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the SUsersQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public SUsersQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion SUsersQuery
		
	#region ThayDoiPhacDoFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ThayDoiPhacDo"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ThayDoiPhacDoFilters : ThayDoiPhacDoFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ThayDoiPhacDoFilters class.
		/// </summary>
		public ThayDoiPhacDoFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ThayDoiPhacDoFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ThayDoiPhacDoFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ThayDoiPhacDoFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ThayDoiPhacDoFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ThayDoiPhacDoFilters
	
	#region ThayDoiPhacDoQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ThayDoiPhacDoParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ThayDoiPhacDo"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ThayDoiPhacDoQuery : ThayDoiPhacDoParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ThayDoiPhacDoQuery class.
		/// </summary>
		public ThayDoiPhacDoQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ThayDoiPhacDoQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ThayDoiPhacDoQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ThayDoiPhacDoQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ThayDoiPhacDoQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ThayDoiPhacDoQuery
		
	#region ThayDoiDieuTriFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ThayDoiDieuTri"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ThayDoiDieuTriFilters : ThayDoiDieuTriFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ThayDoiDieuTriFilters class.
		/// </summary>
		public ThayDoiDieuTriFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ThayDoiDieuTriFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ThayDoiDieuTriFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ThayDoiDieuTriFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ThayDoiDieuTriFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ThayDoiDieuTriFilters
	
	#region ThayDoiDieuTriQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ThayDoiDieuTriParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ThayDoiDieuTri"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ThayDoiDieuTriQuery : ThayDoiDieuTriParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ThayDoiDieuTriQuery class.
		/// </summary>
		public ThayDoiDieuTriQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ThayDoiDieuTriQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ThayDoiDieuTriQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ThayDoiDieuTriQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ThayDoiDieuTriQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ThayDoiDieuTriQuery
		
	#region UtPhacdoFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="UtPhacdo"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class UtPhacdoFilters : UtPhacdoFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the UtPhacdoFilters class.
		/// </summary>
		public UtPhacdoFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the UtPhacdoFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public UtPhacdoFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the UtPhacdoFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public UtPhacdoFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion UtPhacdoFilters
	
	#region UtPhacdoQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="UtPhacdoParameterBuilder"/> class
	/// that is used exclusively with a <see cref="UtPhacdo"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class UtPhacdoQuery : UtPhacdoParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the UtPhacdoQuery class.
		/// </summary>
		public UtPhacdoQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the UtPhacdoQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public UtPhacdoQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the UtPhacdoQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public UtPhacdoQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion UtPhacdoQuery
		
	#region UtDmdvFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="UtDmdv"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class UtDmdvFilters : UtDmdvFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the UtDmdvFilters class.
		/// </summary>
		public UtDmdvFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the UtDmdvFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public UtDmdvFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the UtDmdvFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public UtDmdvFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion UtDmdvFilters
	
	#region UtDmdvQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="UtDmdvParameterBuilder"/> class
	/// that is used exclusively with a <see cref="UtDmdv"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class UtDmdvQuery : UtDmdvParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the UtDmdvQuery class.
		/// </summary>
		public UtDmdvQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the UtDmdvQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public UtDmdvQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the UtDmdvQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public UtDmdvQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion UtDmdvQuery
		
	#region UtDmxnFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="UtDmxn"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class UtDmxnFilters : UtDmxnFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the UtDmxnFilters class.
		/// </summary>
		public UtDmxnFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the UtDmxnFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public UtDmxnFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the UtDmxnFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public UtDmxnFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion UtDmxnFilters
	
	#region UtDmxnQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="UtDmxnParameterBuilder"/> class
	/// that is used exclusively with a <see cref="UtDmxn"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class UtDmxnQuery : UtDmxnParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the UtDmxnQuery class.
		/// </summary>
		public UtDmxnQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the UtDmxnQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public UtDmxnQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the UtDmxnQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public UtDmxnQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion UtDmxnQuery
		
	#region PhanLoaiBenhNhanFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="PhanLoaiBenhNhan"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class PhanLoaiBenhNhanFilters : PhanLoaiBenhNhanFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the PhanLoaiBenhNhanFilters class.
		/// </summary>
		public PhanLoaiBenhNhanFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the PhanLoaiBenhNhanFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public PhanLoaiBenhNhanFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the PhanLoaiBenhNhanFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public PhanLoaiBenhNhanFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion PhanLoaiBenhNhanFilters
	
	#region PhanLoaiBenhNhanQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="PhanLoaiBenhNhanParameterBuilder"/> class
	/// that is used exclusively with a <see cref="PhanLoaiBenhNhan"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class PhanLoaiBenhNhanQuery : PhanLoaiBenhNhanParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the PhanLoaiBenhNhanQuery class.
		/// </summary>
		public PhanLoaiBenhNhanQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the PhanLoaiBenhNhanQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public PhanLoaiBenhNhanQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the PhanLoaiBenhNhanQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public PhanLoaiBenhNhanQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion PhanLoaiBenhNhanQuery
		
	#region UtDmuserFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="UtDmuser"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class UtDmuserFilters : UtDmuserFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the UtDmuserFilters class.
		/// </summary>
		public UtDmuserFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the UtDmuserFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public UtDmuserFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the UtDmuserFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public UtDmuserFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion UtDmuserFilters
	
	#region UtDmuserQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="UtDmuserParameterBuilder"/> class
	/// that is used exclusively with a <see cref="UtDmuser"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class UtDmuserQuery : UtDmuserParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the UtDmuserQuery class.
		/// </summary>
		public UtDmuserQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the UtDmuserQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public UtDmuserQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the UtDmuserQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public UtDmuserQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion UtDmuserQuery
		
	#region LoaiFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Loai"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class LoaiFilters : LoaiFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the LoaiFilters class.
		/// </summary>
		public LoaiFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the LoaiFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public LoaiFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the LoaiFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public LoaiFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion LoaiFilters
	
	#region LoaiQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="LoaiParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Loai"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class LoaiQuery : LoaiParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the LoaiQuery class.
		/// </summary>
		public LoaiQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the LoaiQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public LoaiQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the LoaiQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public LoaiQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion LoaiQuery
		
	#region PdmqhFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Pdmqh"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class PdmqhFilters : PdmqhFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the PdmqhFilters class.
		/// </summary>
		public PdmqhFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the PdmqhFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public PdmqhFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the PdmqhFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public PdmqhFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion PdmqhFilters
	
	#region PdmqhQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="PdmqhParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Pdmqh"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class PdmqhQuery : PdmqhParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the PdmqhQuery class.
		/// </summary>
		public PdmqhQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the PdmqhQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public PdmqhQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the PdmqhQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public PdmqhQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion PdmqhQuery
		
	#region LichSuDieuTriFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="LichSuDieuTri"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class LichSuDieuTriFilters : LichSuDieuTriFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the LichSuDieuTriFilters class.
		/// </summary>
		public LichSuDieuTriFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the LichSuDieuTriFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public LichSuDieuTriFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the LichSuDieuTriFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public LichSuDieuTriFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion LichSuDieuTriFilters
	
	#region LichSuDieuTriQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="LichSuDieuTriParameterBuilder"/> class
	/// that is used exclusively with a <see cref="LichSuDieuTri"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class LichSuDieuTriQuery : LichSuDieuTriParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the LichSuDieuTriQuery class.
		/// </summary>
		public LichSuDieuTriQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the LichSuDieuTriQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public LichSuDieuTriQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the LichSuDieuTriQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public LichSuDieuTriQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion LichSuDieuTriQuery
		
	#region ChuyenOpcBufferFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="ChuyenOpcBuffer"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ChuyenOpcBufferFilters : ChuyenOpcBufferFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ChuyenOpcBufferFilters class.
		/// </summary>
		public ChuyenOpcBufferFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the ChuyenOpcBufferFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ChuyenOpcBufferFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ChuyenOpcBufferFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ChuyenOpcBufferFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ChuyenOpcBufferFilters
	
	#region ChuyenOpcBufferQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ChuyenOpcBufferParameterBuilder"/> class
	/// that is used exclusively with a <see cref="ChuyenOpcBuffer"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class ChuyenOpcBufferQuery : ChuyenOpcBufferParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the ChuyenOpcBufferQuery class.
		/// </summary>
		public ChuyenOpcBufferQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the ChuyenOpcBufferQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public ChuyenOpcBufferQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the ChuyenOpcBufferQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public ChuyenOpcBufferQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion ChuyenOpcBufferQuery
		
	#region DieuTriFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="DieuTri"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class DieuTriFilters : DieuTriFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the DieuTriFilters class.
		/// </summary>
		public DieuTriFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the DieuTriFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public DieuTriFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the DieuTriFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public DieuTriFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion DieuTriFilters
	
	#region DieuTriQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="DieuTriParameterBuilder"/> class
	/// that is used exclusively with a <see cref="DieuTri"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class DieuTriQuery : DieuTriParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the DieuTriQuery class.
		/// </summary>
		public DieuTriQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the DieuTriQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public DieuTriQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the DieuTriQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public DieuTriQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion DieuTriQuery
		
	#region PdmphxaFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Pdmphxa"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class PdmphxaFilters : PdmphxaFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the PdmphxaFilters class.
		/// </summary>
		public PdmphxaFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the PdmphxaFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public PdmphxaFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the PdmphxaFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public PdmphxaFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion PdmphxaFilters
	
	#region PdmphxaQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="PdmphxaParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Pdmphxa"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class PdmphxaQuery : PdmphxaParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the PdmphxaQuery class.
		/// </summary>
		public PdmphxaQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the PdmphxaQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public PdmphxaQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the PdmphxaQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public PdmphxaQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion PdmphxaQuery
		
	#region PdmdtFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Pdmdt"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class PdmdtFilters : PdmdtFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the PdmdtFilters class.
		/// </summary>
		public PdmdtFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the PdmdtFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public PdmdtFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the PdmdtFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public PdmdtFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion PdmdtFilters
	
	#region PdmdtQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="PdmdtParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Pdmdt"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class PdmdtQuery : PdmdtParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the PdmdtQuery class.
		/// </summary>
		public PdmdtQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the PdmdtQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public PdmdtQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the PdmdtQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public PdmdtQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion PdmdtQuery
		
	#region PdmnnFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Pdmnn"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class PdmnnFilters : PdmnnFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the PdmnnFilters class.
		/// </summary>
		public PdmnnFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the PdmnnFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public PdmnnFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the PdmnnFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public PdmnnFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion PdmnnFilters
	
	#region PdmnnQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="PdmnnParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Pdmnn"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class PdmnnQuery : PdmnnParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the PdmnnQuery class.
		/// </summary>
		public PdmnnQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the PdmnnQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public PdmnnQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the PdmnnQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public PdmnnQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion PdmnnQuery
		
	#region UtTinhFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="UtTinh"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class UtTinhFilters : UtTinhFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the UtTinhFilters class.
		/// </summary>
		public UtTinhFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the UtTinhFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public UtTinhFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the UtTinhFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public UtTinhFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion UtTinhFilters
	
	#region UtTinhQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="UtTinhParameterBuilder"/> class
	/// that is used exclusively with a <see cref="UtTinh"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class UtTinhQuery : UtTinhParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the UtTinhQuery class.
		/// </summary>
		public UtTinhQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the UtTinhQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public UtTinhQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the UtTinhQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public UtTinhQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion UtTinhQuery
		
	#region PdmnclnFilters
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Pdmncln"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class PdmnclnFilters : PdmnclnFilterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the PdmnclnFilters class.
		/// </summary>
		public PdmnclnFilters() : base() { }

		/// <summary>
		/// Initializes a new instance of the PdmnclnFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public PdmnclnFilters(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the PdmnclnFilters class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public PdmnclnFilters(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion PdmnclnFilters
	
	#region PdmnclnQuery
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="PdmnclnParameterBuilder"/> class
	/// that is used exclusively with a <see cref="Pdmncln"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class PdmnclnQuery : PdmnclnParameterBuilder
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the PdmnclnQuery class.
		/// </summary>
		public PdmnclnQuery() : base() { }

		/// <summary>
		/// Initializes a new instance of the PdmnclnQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public PdmnclnQuery(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the PdmnclnQuery class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public PdmnclnQuery(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion PdmnclnQuery
	#endregion

	
}
